package aspirecn.project3.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * packageName aspirecn.project3.config
 *
 * @author 邵一宸
 * @version JDK 17
 * @className MybatisPlusPageConfig
 * @date 2024/7/19
 * @description TODO
 */

@Configuration
public class MybatisPlusPageConfig {

    /**
     * 新版分页配置
     * @return
     */
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
        mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return mybatisPlusInterceptor;

    }

}
